package com.opentae.data.mall.examples;

import com.opentae.core.mybatis.SgExample;
import com.opentae.core.mybatis.example.EntityColumn;
import com.opentae.core.mybatis.example.EntityTable;
import com.opentae.core.mybatis.mapperhelper.EntityHelper;
import com.opentae.data.mall.beans.DiySql;

import java.util.*;
public class DiySqlExample extends SgExample<DiySqlExample.Criteria> {
    public static final Class<DiySql> beanClass = DiySql.class;
    public static final EntityTable entityTable = EntityHelper.getEntityTable(beanClass);
    public static EntityColumn sqlId;
    public static EntityColumn targetId;
    public static EntityColumn useFor;
    public static EntityColumn sqlContent;
    static {
        Set<EntityColumn> columns = entityTable.getEntityClassColumns();
        Map<String, EntityColumn> listMap = new HashMap<>();
        for (EntityColumn column : columns) {
            listMap.put(column.getProperty(), column);
        }
        sqlId = listMap.get("sqlId");
        targetId = listMap.get("targetId");
        useFor = listMap.get("useFor");
        sqlContent = listMap.get("sqlContent");
        }

    public DiySqlExample() {
        this.setTableAlias(entityTable.getName());
    }

    @Override
    public EntityTable getEntityTable() {
        return entityTable;
    }

    @Override
    protected DiySqlExample.Criteria createCriteriaInternal() {
        return new DiySqlExample.Criteria(this);
    }

    public static class Criteria extends SgExample.GeneratedCriteria<Criteria> {
        protected Criteria(SgExample example) {
            super(example);
        }

        public DiySqlExample.Criteria andSqlIdIsNull() {
            return isNull(sqlId);
        }

        public DiySqlExample.Criteria andSqlIdIsNotNull() {
            return isNotNull(sqlId);
        }

        public DiySqlExample.Criteria andSqlIdEqualTo(Long value) {
            return equalTo(sqlId, value);
        }

        public DiySqlExample.Criteria andSqlIdNotEqualTo(Long value) {
            return notEqualTo(sqlId, value);
        }

        public DiySqlExample.Criteria andSqlIdGreaterThan(Long value) {
            return greaterThan(sqlId, value);
        }

        public DiySqlExample.Criteria andSqlIdGreaterThanOrEqualTo(Long value) {
            return greaterThanOrEqualTo(sqlId, value);
        }

        public DiySqlExample.Criteria andSqlIdLessThan(Long value) {
            return lessThan(sqlId, value);
        }

        public DiySqlExample.Criteria andSqlIdLessThanOrEqualTo(Long value) {
            return lessThanOrEqualTo(sqlId, value);
        }

        public DiySqlExample.Criteria andSqlIdIn(List<Long> values) {
            return in(sqlId, values);
        }

        public DiySqlExample.Criteria andSqlIdNotIn(List<Long> values) {
            return notIn(sqlId, values);
        }

        public DiySqlExample.Criteria andSqlIdBetween(Long value1, Long value2) {
            return between(sqlId, value1, value2);
        }

        public DiySqlExample.Criteria andSqlIdNotBetween(Long value1, Long value2) {
            return notBetween(sqlId, value1, value2);
        }
        public DiySqlExample.Criteria andTargetIdIsNull() {
            return isNull(targetId);
        }

        public DiySqlExample.Criteria andTargetIdIsNotNull() {
            return isNotNull(targetId);
        }

        public DiySqlExample.Criteria andTargetIdEqualTo(Long value) {
            return equalTo(targetId, value);
        }

        public DiySqlExample.Criteria andTargetIdNotEqualTo(Long value) {
            return notEqualTo(targetId, value);
        }

        public DiySqlExample.Criteria andTargetIdGreaterThan(Long value) {
            return greaterThan(targetId, value);
        }

        public DiySqlExample.Criteria andTargetIdGreaterThanOrEqualTo(Long value) {
            return greaterThanOrEqualTo(targetId, value);
        }

        public DiySqlExample.Criteria andTargetIdLessThan(Long value) {
            return lessThan(targetId, value);
        }

        public DiySqlExample.Criteria andTargetIdLessThanOrEqualTo(Long value) {
            return lessThanOrEqualTo(targetId, value);
        }

        public DiySqlExample.Criteria andTargetIdIn(List<Long> values) {
            return in(targetId, values);
        }

        public DiySqlExample.Criteria andTargetIdNotIn(List<Long> values) {
            return notIn(targetId, values);
        }

        public DiySqlExample.Criteria andTargetIdBetween(Long value1, Long value2) {
            return between(targetId, value1, value2);
        }

        public DiySqlExample.Criteria andTargetIdNotBetween(Long value1, Long value2) {
            return notBetween(targetId, value1, value2);
        }
        public DiySqlExample.Criteria andUseForIsNull() {
            return isNull(useFor);
        }

        public DiySqlExample.Criteria andUseForIsNotNull() {
            return isNotNull(useFor);
        }

        public DiySqlExample.Criteria andUseForEqualTo(Integer value) {
            return equalTo(useFor, value);
        }

        public DiySqlExample.Criteria andUseForNotEqualTo(Integer value) {
            return notEqualTo(useFor, value);
        }

        public DiySqlExample.Criteria andUseForGreaterThan(Integer value) {
            return greaterThan(useFor, value);
        }

        public DiySqlExample.Criteria andUseForGreaterThanOrEqualTo(Integer value) {
            return greaterThanOrEqualTo(useFor, value);
        }

        public DiySqlExample.Criteria andUseForLessThan(Integer value) {
            return lessThan(useFor, value);
        }

        public DiySqlExample.Criteria andUseForLessThanOrEqualTo(Integer value) {
            return lessThanOrEqualTo(useFor, value);
        }

        public DiySqlExample.Criteria andUseForIn(List<Integer> values) {
            return in(useFor, values);
        }

        public DiySqlExample.Criteria andUseForNotIn(List<Integer> values) {
            return notIn(useFor, values);
        }

        public DiySqlExample.Criteria andUseForBetween(Integer value1, Integer value2) {
            return between(useFor, value1, value2);
        }

        public DiySqlExample.Criteria andUseForNotBetween(Integer value1, Integer value2) {
            return notBetween(useFor, value1, value2);
        }
        public DiySqlExample.Criteria andSqlContentIsNull() {
            return isNull(sqlContent);
        }

        public DiySqlExample.Criteria andSqlContentIsNotNull() {
            return isNotNull(sqlContent);
        }

        public DiySqlExample.Criteria andSqlContentEqualTo(String value) {
            return equalTo(sqlContent, value);
        }

        public DiySqlExample.Criteria andSqlContentNotEqualTo(String value) {
            return notEqualTo(sqlContent, value);
        }

        public DiySqlExample.Criteria andSqlContentGreaterThan(String value) {
            return greaterThan(sqlContent, value);
        }

        public DiySqlExample.Criteria andSqlContentGreaterThanOrEqualTo(String value) {
            return greaterThanOrEqualTo(sqlContent, value);
        }

        public DiySqlExample.Criteria andSqlContentLessThan(String value) {
            return lessThan(sqlContent, value);
        }

        public DiySqlExample.Criteria andSqlContentLessThanOrEqualTo(String value) {
            return lessThanOrEqualTo(sqlContent, value);
        }

        public DiySqlExample.Criteria andSqlContentLike(String value) {
            return like(sqlContent, value);
        }

        public DiySqlExample.Criteria andSqlContentNotLike(String value) {
            return notLike(sqlContent, value);
        }

        public DiySqlExample.Criteria andSqlContentIn(List<String> values) {
            return in(sqlContent, values);
        }

        public DiySqlExample.Criteria andSqlContentNotIn(List<String> values) {
            return notIn(sqlContent, values);
        }

        public DiySqlExample.Criteria andSqlContentBetween(String value1, String value2) {
            return between(sqlContent, value1, value2);
        }

        public DiySqlExample.Criteria andSqlContentNotBetween(String value1, String value2) {
            return notBetween(sqlContent, value1, value2);
        }
    }
}